package com.weixin.paleituo.adapter;

import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.weixin.paleituo.fragment.WuyeAwaitPaymentFragment;
import com.weixin.paleituo.fragment.WuyeHistoryPaymentFragment;

/**
 * Author yichao
 * Time  2018/4/1 10:44
 * Dest 物业缴费
 */
public class WuyePaymentPagerAdapter extends FragmentPagerAdapter {
    private final String[] mArgs;

    public WuyePaymentPagerAdapter(FragmentManager fm, String[] args ) {
        super(fm);
        mArgs = args;

    }
    @Override
    public Fragment getItem(final int position) {
       // return ClassGoodsFragmentFactory.getFragment(position,mClassifyBeanList.get(position));
        Fragment fragment=null;
        if (position==0){
            fragment=new WuyeAwaitPaymentFragment();

        }else if (position==1){
        fragment= new WuyeHistoryPaymentFragment();
        }
        return fragment;
    }
    @Nullable
    @Override
    public CharSequence getPageTitle(int position) {
        return mArgs[position%mArgs.length];
    }

    @Override
    public int getCount() {
        return mArgs.length;
    }
}
